Repository navigation
OME-TIFF: remove extra Channels all at once - #4489
Conversation
This means the MetadataStore root only needs to be reset once, which for OMEPyramidStore (with resolution annotations present) means the memory usage is substantially reduced.
sbesson
left a comment
There was a problem hiding this comment.
After generating a plate OME-TIFF as described in the PR, I confirm that without this PR, the reader initialization using showinf -ome-xml without additional configuration runs out of heap space. Setting BF_MAX_MEM=2g is sufficient to initialize the file fully.
With this PR included, the reader initializes using the default memory settings and the OME-XML metadata is identical to the one generated without this PR.
For additional profiling, I used the JDK Flight Recorder and generated recording files that can be inspected using JDK Misson Control without this PR
and with this PR
These confirm the memory footprint is significantly reduced by removing the channels of all images in the plate in a single operation.
This means the
MetadataStoreroot only needs to be reset once, which forOMEPyramidStore(with resolution annotations present) means the memory usage is substantially reduced.The issue can be demonstrated by converting
test&plateRows=16&plateCols=24&fields=6&sizeX=512&sizeY=512&sizeC=3.faketo OME-TIFF through bioformats2raw/raw2ometiff and then runningshowinf -nopix -omexmlon the OME-TIFF. AnOutOfMemoryErrorshould occur with default memory settings forshowinf, i.e.BF_MAX_MEMwas unset.With this change and the same OME-TIFF,
showinf -nopix -omexmlwith default memory completes and prints OME-XML without error. SettingBF_MAX_MEMas low as230m(less than half of the default) should also work.No impact on existing tests is expected.